package com.token;

import org.apache.shiro.authz.Permission;

import java.util.logging.Logger;

public class MyPermission implements Permission {
    private String url;
    public MyPermission(String url)
    {
        this.url = url;
    }
    @Override
    public boolean implies(Permission p) {
        Logger.getLogger("ROOT").info("################");
        Logger.getLogger("ROOT").info(this.url);
        Logger.getLogger("ROOT").info(p.toString());
        if (p instanceof MyPermission==false)
        {
            Logger.getLogger("ROOT").info("类型失败");

            return true;
        }

        MyPermission myPermission = (MyPermission) p;
        System.out.println(myPermission.url);
        Logger.getLogger("ROOT").info(myPermission.url);
        return false;
    }
}
